<%Option Explicit%>
<html>
<head>
<title>Select Local Image</title>
<META NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link rel="stylesheet" href="global.css" type="text/css">
<SCRIPT LANGUAGE=JavaScript FOR=ImageList EVENT=onclick>
<!--
window.returnValue = "images/" + event.srcElement.title;
window.close();
// -->
</SCRIPT>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<div align="center" class="body">
<!--<p><b>Simply click on an image to copy it to the IFrame</b></p>
<p><font color="#ff0000"><b>Make sure you have clicked in the IFrame before inserting an image, otherwise nothing will happen.</b></font></p>-->

<br>
<p><font size=3 face=arial><b>Mời bạn chọn ảnh để thêm vào văn bản</b></font></p>
<table border="1" cellpadding="2" cellspacing="0" id="ImageList">
<tr>
<%
Dim objFSO
Dim objFolder
Dim objFile
Dim i 
i=1	
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
	Set objFolder = objFSO.GetFolder(Server.MapPath("images"))
		For Each objFile in objFolder.Files
			if objFile.Name<>"empty.gif" and objFile.Name<>"imageUpload.gif" and objFile.Name<>"vertical_line.gif" then
%>
	<td><a href="#"><img src="<%="images/" & objFile.Name%>" title="<%=objFile.Name%>" border="0"></a></td>
<%			
				if i=4 then 
					response.write "</tr>"
					response.write "<tr>"
					i=0
				end if
				i=i+1
			end if
		Next
		Set objFolder = Nothing	
Set objFSO = Nothing
%>
</tr>
</table>
<p><font color="#ff0000" size=2 face=arial><b>Chú ý: Bạn phải click chuột vào cửa sổ soạn thảo văn bản trước khi chọn ảnh</b></font></p>

</div>
</body>
</html>